﻿using System.Collections.Generic;
using NHibernate;
using Thaire.Investment.Domains.Transaction;

namespace Thaire.Investment.Repository
{
    public class UnitTrustTransactionRepo : BaseRepository<UnitTrustTransaction, int>
    {
        public UnitTrustTransactionRepo(ISession session)
            : base(session)
        {
        }
        public List<UnitTrustTransaction> GetListByHeaderID(int headerId)
        {
            return new List<UnitTrustTransaction>(_session.QueryOver<UnitTrustTransaction>()
                .Where(x => x.UnitTrustTransactionHeaderID == headerId)
                .OrderBy(x => x.CreateDate).Asc.List());
        }
    }
}
